<?php
$this->headLink()->appendStylesheet($this->baseUrl('widget/dataTable/css/dataTables.css'));
$this->headScript()->appendFile($this->baseUrl('widget/dataTable/js/jquery.dataTables.min.js'));
$this->headScript()->appendFile($this->baseUrl('widget/dataTable/js/initDataTables.js'));

$this->placeholder("navegacion")->set($this->navegacion($this->nav));
$appConfig = Zend_Registry::get("appConfig");
$domConfig = Zend_Registry::get("domConfig");
?>
<?php if(count($this->datos)>0):?>
<br/>
<table id="table_id" align="center" class="iceDatTbl zebra">
  <thead>
    <tr>
      <th width="10%">C&oacute;digo SNIES</th>
      <th width="50%">Instituci&oacute;n</th>
      <th width="30%">Direcci&oacute;n / tel&eacute;fono</th>
       <th width="10%">Acciones</th>
    </tr>
  </thead>
  <tbody>
	<?php foreach ($this->datos as $value):?>
	<?php
		$params=App_Util_SafeUrl::encriptar(array("codinstitucion"=>$value["codinstitucion"]),true);
	?>
    <tr>
      <td style="text-align:center;">
      	<?php echo $value["ins_codigo"];?>
      </td>
      <td><?php echo $value["nombrecompleto"];?><br/><?php echo $value["ubicacion"];?></td>
      <td><?php echo $value["direccion"];?><br/><?php echo "{$value["telefono1"]}-{$value["telefono2"]}";?></td>
      <td><a href="<?php echo $this->baseUrl("/usuarios/instituciones/usuariosies/{$params}");?>" title="Usuarios IES"><img src="<?=$this->baseUrl('img/icon_group.gif');?>" /></a> (<?php echo $value["cantidad"];?>)
      </td>
     </tr>
  <?php  endforeach;?>
  </tbody>
</table>
<script type="text/javascript">
 
$(function() {
	var oTable = $('#table_id').dataTable({
		"bJQueryUI": true,
		"bAutoWidth": false,
		"oLanguage": { "sUrl": baseUrl + "/widget/dataTable/lang.es.txt" },
 		"sPaginationType": "full_numbers",
 		"bStateSave": true,
 		"aoColumns": [
 	 		 			null,
 	 		 			null,
 	 		 			null,
 	 		 			{ "bSortable": false}
 	 		 		 ]
 	 		  		
	});
	oTable.fnSetFilteringDelay();
});
</script>
<?php else:?>
<br/>
<?php echo $this->mensajes("No existen registros");?>
<?php endif;?>
